import { http } from '@/utils'

export function updateMiniUserInfo(data: { nickname: string; avatar: string }) {
  return http.post('/paas/paasminiprogramuser/saveInfo', data)
}

export function updatePwd(data: any) {
  return http.post<any>('/paas/paasuser/updatePassword', data, {
    joinParamsToUrl: true
  })
}

// 发布反馈建议
export function postFeedBackApi(data: any) {
  return http.post<any>('/network_security_science/submit_feedback', data)
}

// 获取反馈建议
export function getFeedBackApi(query: any) {
  return http.get<any>('/network_security_science/get_feedback_records', query)
}

// 回复
export function replyFeedBackApi(data: any) {
  return http.post<any>('/network_security_science/submit_feedback_reply', data)
}

// 提交科普知识
export function submitKnowledgeApi(data: any) {
  return http.post<any>(
    '/network_security_science/submit_science_records',
    data
  )
}

// AI生成题目
export function getAiQuestionApi(query: any) {
  return http.get<any>('/intelligent_health/health_suggestion', query)
}
